package com.yykj.user.center.server.controller;

import com.yykj.common.vo.ResultVO;
import com.yykj.user.center.client.dto.ConsultationOrderInfoDTO;
import com.yykj.user.center.client.dto.ConsultationStatisticsDto;
import com.yykj.user.center.server.dto.ConsultationInfoDTO;
import com.yykj.user.center.server.service.patient.ConsultationInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/proto/order")
@Api(tags = "内部服务之间调用接口-外部不用")
public class ProtoOrderController {

    @Autowired
    private ConsultationInfoService consultationInfoService;

    @GetMapping("/statistics")
    @ApiOperation(value = "问诊统计", notes = "问诊统计")
    public ConsultationStatisticsDto statistics(
            @RequestParam(value = "doctorId", required = true) String doctorId
    ) {
        return consultationInfoService.statistics(doctorId);
    }

    @GetMapping("/orderInfo")
    @ApiOperation(value = "根据订单号获取问诊详情")
    public ConsultationOrderInfoDTO orderInfo(@RequestParam(value = "orderNo", required = true) String orderNo) {
        return consultationInfoService.orderInfo(orderNo);
    }
}